Arithmetic method and apparatus for supporting aes and aria encryption/decryption functions

ABSTRACT

Provided are an arithmetic method and apparatus for supporting Advanced Encryption Standard (AES) and Academy, Research Institute and Agency (ARIA) encryption/decryption functions. The apparatus includes: a key scheduler for generating a round key using an input key; and a round function calculator for generating encrypted/decrypted data using input data and the round key. Here, the round function calculator includes an integrated substitution layer and an integrated diffusion layer capable of performing both AES and ARIA algorithms.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to and the benefit of Korean Patent Application Nos. 2006-111856, filed Nov. 13, 2006, and 2007-46526, filed May 14, 2007, the disclosures of which are incorporated herein by reference in their entirety.

BACKGROUND

1. Field of the Invention

The present invention relates to an arithmetic method and apparatus for supporting Advanced Encryption Standard (AES) and Academy, Research Institute and Agency (ARIA) encryption/decryption functions.

2. Discussion of Related Art

An AES block encryption algorithm was selected as an American standard by the National Institute of Standards and Technology (NIST) of the United States in 2001. In addition, an ARIA block encryption algorithm was selected as a Korean Industrial Standard. The two domestic and foreign standard block encryption algorithms, i.e., the AES and ARIA algorithms, are widely used in various encryption fields, such as smart cards, electronic passports, server-level encryption equipment, and so on.

Most encryption operations take a long time to complete and thus are implemented in hardware. In the early stages of AES or ARIA hardware implementation, research comparing and analyzing performance of the hardware according to high-performance implementation techniques or methods was generally conducted. However, with the gradual development of wireless technology, such as cellular phones and Radio Frequency Identification (RFID), research on miniaturization and implementation of low power consumption has been conducted recently.

Research on an encryption operation apparatus having integrated hardware supporting at least 2 encryption algorithms is less active than research on an arithmetic apparatus for a single encryption algorithm. This is because, when compared to software implementation, hardware implementation generally requires twice as many resources to implement 2 algorithms. However, as illustrated in FIGS. 1 and 2, the AES and ARIA algorithms use round functions having the similar Substitution Permutation Network (SPN) structure, thus having many common features. First, in an S-box operation, which is a basic operation of a substitution layer, the 2 algorithms use the same finite field GF(2⁸). In addition, from a scalar multiplication matrix operation used in a diffusion layer, it is possible to extract terms used in common by the two algorithms.

SUMMARY OF THE INVENTION

The present invention is directed to an arithmetic method and apparatus of integrated hardware supporting both Advanced Encryption Standard (AES) and Academy, Research Institute and Agency (ARIA) functions using a hardware resource sharing method for common factors between AES and ARIA algorithms.

One aspect of the present invention provides an arithmetic method of supporting AES and ARIA encryption/decryption functions, the method comprising the steps of: receiving input data and a round key; performing an S-box operation used in common in AES and ARIA algorithms using the input data and the round key; and extracting common terms used in a diffusion function of the AES and ARIA algorithms using the data on which the S-box operation is performed, and performing a diffusion operation.

Another aspect of the present invention provides an integrated arithmetic apparatus for supporting AES and ARIA encryption/decryption functions, the apparatus comprising: a key scheduler for generating a round key using an input key; and a round function calculator for generating encrypted/decrypted data using input data and the round key. Here, the round function calculator includes an integrated substitution layer and an integrated diffusion layer capable of performing both AES and ARIA algorithms.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other objects, features and advantages of the present invention will become more apparent to those of ordinary skill in the art by describing in detail exemplary embodiments thereof with reference to the attached drawings, in which:

FIG. 1 illustrates an encryption process of an Advanced Encryption Standard (AES) algorithm;

FIG. 2 illustrates an encryption process of an Academy, Research Institute and Agency (ARIA) algorithm;

FIG. 3 is a block diagram of an arithmetic apparatus having AES and ARIA-integrated hardware according to an exemplary embodiment of the present invention;

FIG. 4 is a block diagram of an integrated substitution layer according to an exemplary embodiment of the present invention;

FIG. 5 illustrates operation of an S_(A) S-box block according to an exemplary embodiment of the present invention;

FIG. 6 illustrates operation of an S_(U) S-box block according to an exemplary embodiment of the present invention; and

FIG. 7 is a block diagram of an integrated diffusion layer according to an exemplary embodiment of the present invention.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

In this specification, currently used general terminology is mostly employed, but other terminology that has been selected for the present invention by the applicant himself/herself is also employed. In this case, the meaning of the terminology selected by the applicant is mentioned in the corresponding detailed description, and thus the present invention should be understood using the meanings provided in the detailed description, as opposed to their general meaning.

Hereinafter, exemplary embodiments of the present invention will be described in detail. However, the present invention is not limited to the embodiments disclosed below, but can be implemented in various forms. The following embodiments are described in order to enable those of ordinary skill in the art to embody and practice the present invention.

FIG. 3 is a block diagram of an apparatus having Advanced Encryption Standard (AES) and Academy, Research Institute and Agency (ARIA)-integrated hardware according to an exemplary embodiment of the present invention. The apparatus having AES and ARIA-integrated hardware comprises a round function calculator 310 and a key scheduler 350. The round function calculator 310 performs one round operation, and includes: an integrated substitution layer 320 for performing an S-box operation used in common for AES and ARIA algorithms using input data and a round key input from the key scheduler 350; an integrated diffusion layer 330 for performing a diffusion operation used in a diffusion function of the AES and ARIA algorithms using the operation result of the integrated substitution layer 320; a register 340 for storing 128-bit data; and a multiplexer (MUX) for selecting a data path.

The key scheduler 350 includes an AES key scheduler block 360 and an ARIA key scheduler block 370, and can calculate a round key required for each round by an on-the-fly method. Here, to economize hardware resources, a 128-bit register W₀ 380, which is one of round key storages in the ARIA key scheduler block 370, may be also used as a register for storing an AES round key.

FIG. 4 is a block diagram of the integrated substitution layer 320. Referring to FIG. 4, the integrated substitution layer 320 comprises an S_(A) (AES S-Box) 410 and an S_(U) (Unified S-Box) 420. First, the S_(A) 410, which is an S-box used in common for AES and ARIA algorithms, selectively performs S¹ and S⁻¹ functions as shown in Formula 1 below.

FIG. 5 illustrates operation of the S_(A). Here, δ_(A) is an isomorphism function that maps an 8-bit input in a finite field GF(2⁸) onto an element in a GF(((2²)²)²), and Aff_(S1) is an affine transformation function shown in Formula 1 below. In addition, Aff_(S1) ⁻¹*δ_(A) and δ_(A) ⁻¹*Aff_(S1) are combined functions of δ_(A) and the affine transformation function. Such an S_(A) performs the same function as an S-box used in the AES algorithm, and thus a detailed description thereof will be omitted.

$\begin{matrix} {\begin{matrix} {{S_{1}(x)} = {{A \cdot x^{- 1}} \oplus b}} \\ {= {{\begin{pmatrix} 1 & 0 & 0 & 0 & 1 & 1 & 1 & 1 \\ 1 & 1 & 0 & 0 & 0 & 1 & 1 & 1 \\ 1 & 1 & 1 & 0 & 0 & 0 & 1 & 1 \\ 1 & 1 & 1 & 1 & 0 & 0 & 0 & 1 \\ 1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 0 & 1 & 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 1 & 1 & 1 & 0 \\ 0 & 0 & 0 & 1 & 1 & 1 & 1 & 1 \end{pmatrix} \cdot x^{- 1}} \oplus \begin{pmatrix} 1 \\ 1 \\ 0 \\ 0 \\ 0 \\ 1 \\ 1 \\ 0 \end{pmatrix}}} \end{matrix}\begin{matrix} {{S_{1}^{- 1}(x)} = \left( {A^{- 1} \cdot \left( {x \oplus b} \right)} \right)^{- 1}} \\ {= \left( {{A^{- 1} \cdot x} \oplus {A^{- 1} \cdot b}} \right)^{- 1}} \\ {= \left\lbrack {{\begin{pmatrix} 0 & 0 & 1 & 0 & 0 & 1 & 0 & 1 \\ 1 & 0 & 0 & 1 & 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 & 1 & 0 & 0 & 1 \\ 1 & 0 & 1 & 0 & 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 & 0 & 1 & 0 \\ 0 & 0 & 1 & 0 & 1 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 1 & 1 & 0 & 1 & 0 \end{pmatrix} \cdot x} \oplus \begin{pmatrix} 1 \\ 0 \\ 1 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \end{pmatrix}} \right\rbrack^{- 1}} \end{matrix}} & \left\lbrack {{Formula}\mspace{14mu} 1} \right\rbrack \end{matrix}$

Meanwhile, the S_(U) selectively performs 4 functions of S₁, S₁ ⁻¹, S₂ and S₂ ⁻¹. Here, S₂ uses x²⁴⁷ instead of x⁻¹. With respect to an element x in a GF(2⁸), x²¹ (“i” is an integer) may be calculated to be M_(i)*x using an appropriate 8×8 binary non-singular matrix M_(i). Therefore, the functions S₂ and S₂ ⁻¹ can be arranged as shown in Formula 2 below. FIG. 6 illustrates operation of the S_(U). Here, δ_(U) is an isomorphism function, and Aff_(S2) is an affine transformation function shown in Formula 2 below. Here, in order to optimize hardware area, all available isomorphism functions δ_(U) are examined, thereby determining the isomorphism function δ_(U) having the smallest number of “1” in an 8×8 binary matrix used in each of 6 functions of δ_(U), δ_(U) ⁻¹, Aff_(S1) ⁻¹*δ_(U), δ_(U) ^(−1*)Aff₁, Aff_(S2) ⁻¹*δ_(U) and δ_(U) ⁻¹*Aff_(S2), and calculating other functions using the determined isomorphism function δ_(U).

$\begin{matrix} {\begin{matrix} {{S_{2}(x)} = {{C \cdot x^{247}} \oplus d}} \\ {= {{C \cdot x^{- 8}} \oplus d}} \\ {= {{C \cdot \left( x^{- 1} \right)^{- 8}} \oplus d}} \\ {= {{C \cdot M_{3} \cdot \left( x^{- 1} \right)} \oplus d}} \\ {= {{\begin{pmatrix} 0 & 1 & 0 & 1 & 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 1 & 1 & 0 & 1 & 1 & 0 & 1 \\ 1 & 1 & 0 & 0 & 0 & 0 & 1 & 1 \\ 0 & 1 & 0 & 0 & 0 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 & 1 & 1 & 1 & 0 \\ 0 & 1 & 1 & 0 & 0 & 0 & 1 & 1 \\ 1 & 1 & 1 & 1 & 0 & 1 & 1 & 0 \end{pmatrix} \cdot x^{- 1}} \oplus \begin{pmatrix} 0 \\ 1 \\ 0 \\ 0 \\ 0 \\ 1 \\ 1 \\ 1 \end{pmatrix}}} \end{matrix}\begin{matrix} {\left( {S_{2}^{- 1}(x)} \right)^{- 8} = {{C^{- 1} \cdot \left( {x \oplus d} \right)}\therefore{S_{2}^{- 1}(x)}}} \\ {= \left( {C^{- 1} \cdot \left( {x \oplus d} \right)} \right)^{- 32}} \\ {= \left( \left( {C^{- 1} \cdot \left( {x \oplus d} \right)^{32}} \right)^{- 1} \right.} \\ {= \left( {M_{5} \cdot C^{- 1} \cdot \left( {x \oplus d} \right)} \right)^{- 1}} \\ \left. {= \left( {{M_{5} \cdot C^{- 1} \cdot x} \oplus {M_{5} \cdot C^{- 1} \cdot d}} \right)} \right)^{- 1} \\ {= \left( {{F \cdot x} \oplus {F \cdot d}} \right)^{- 1}} \\ {= \left\lbrack {{\begin{pmatrix} 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 \\ 1 & 1 & 1 & 0 & 0 & 0 & 1 & 1 \\ 1 & 1 & 1 & 0 & 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 & 1 & 1 \\ 1 & 0 & 1 & 1 & 1 & 1 & 0 & 1 \\ 1 & 0 & 0 & 1 & 0 & 0 & 1 & 1 \end{pmatrix} \cdot x} \oplus \begin{pmatrix} 0 \\ 0 \\ 1 \\ 1 \\ 0 \\ 1 \\ 0 \\ 0 \end{pmatrix}} \right\rbrack^{- 1}} \end{matrix}} & \left\lbrack {{Formula}\mspace{14mu} 2} \right\rbrack \end{matrix}$

An AES diffusion layer performs a MixColumns operation and an InvMixColumns operation upon encryption and decryption, respectively. Such an AES diffusion layer performs matrix multiplication in units of 32-bit data. On the other hand, an ARIA diffusion layer performs 16×16 binary matrix multiplication on the entire 128-bit data in units of 1 byte. The arithmetic method and apparatus according to an exemplary embodiment of the present invention have an AES and ARIA-integrated diffusion layer that extracts the common terms used in the AES and ARIA diffusion layers and operates in units of 128 bits.

First, in the AES algorithm, 128-bit values [Y₀, Y₁, Y₂, Y₃] resulting from the MixColumns operation on 128-bit input [X₀, X₁, X₂, X₃] may be calculated as shown in Formula 3 below. Here, X_(i) and Y_(i) denote 32-bit unit data.

$\begin{matrix} \begin{matrix} {\begin{pmatrix} Y_{0} \\ Y_{1} \\ Y_{2} \\ Y_{3} \end{pmatrix} = {\begin{pmatrix} M_{0} & 0 & 0 & 0 \\ 0 & M_{0} & 0 & 0 \\ 0 & 0 & M_{0} & 0 \\ 0 & 0 & 0 & M_{0} \end{pmatrix} \cdot \begin{pmatrix} X_{0} \\ X_{1} \\ X_{2} \\ X_{3} \end{pmatrix}}} \\ {= {{\begin{pmatrix} M_{0}^{\prime} & 0 & 0 & 0 \\ 0 & M_{0}^{\prime} & 0 & 0 \\ 0 & 0 & M_{0}^{\prime} & 0 \\ 0 & 0 & 0 & M_{0}^{\prime} \end{pmatrix} \cdot \begin{pmatrix} X_{0} \\ X_{1} \\ X_{2} \\ X_{3} \end{pmatrix}} +}} \\ {{\begin{pmatrix} M_{0}^{''} & 0 & 0 & 0 \\ 0 & M_{0}^{''} & 0 & 0 \\ 0 & 0 & M_{0}^{''} & 0 \\ 0 & 0 & 0 & M_{0}^{''} \end{pmatrix} \cdot \begin{pmatrix} X_{0} \\ X_{1} \\ X_{2} \\ X_{3} \end{pmatrix}}} \end{matrix} & \left\lbrack {{Formula}\mspace{14mu} 3} \right\rbrack \end{matrix}$

Here, 4×4 matrices M₀, M₀′ and M₀″ are as shown below.

${M_{0} = \begin{pmatrix} 2 & 3 & 1 & 1 \\ 1 & 2 & 3 & 1 \\ 1 & 1 & 2 & 3 \\ 3 & 1 & 1 & 2 \end{pmatrix}},{M_{0}^{\prime} = \begin{pmatrix} 2 & 2 & 0 & 0 \\ 0 & 2 & 2 & 0 \\ 0 & 0 & 2 & 2 \\ 2 & 0 & 0 & 2 \end{pmatrix}},{M_{0}^{''} = \begin{pmatrix} 0 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 1 \\ 1 & 1 & 1 & 0 \end{pmatrix}}$

In the same way, 128-bit values [Z₀, Z₁, Z₂, Z₃] resulting from the InvMixColumns operation are calculated as shown in Formula 4 below. Here, Z_(i) denotes 32-bit unit data.

$\begin{matrix} \begin{matrix} {\begin{pmatrix} Z_{0} \\ Z_{1} \\ Z_{2} \\ Z_{3} \end{pmatrix} = {\begin{pmatrix} M_{1} & 0 & 0 & 0 \\ 0 & M_{1} & 0 & 0 \\ 0 & 0 & M_{1} & 0 \\ 0 & 0 & 0 & M_{1} \end{pmatrix} \cdot \begin{pmatrix} X_{0} \\ X_{1} \\ X_{2} \\ X_{3} \end{pmatrix}}} \\ {= {{\begin{pmatrix} M_{1}^{\prime} & 0 & 0 & 0 \\ 0 & M_{1}^{\prime} & 0 & 0 \\ 0 & 0 & M_{1}^{\prime} & 0 \\ 0 & 0 & 0 & M_{1}^{\prime} \end{pmatrix} \cdot \begin{pmatrix} X_{0} \\ X_{1} \\ X_{2} \\ X_{3} \end{pmatrix}} +}} \\ {{{\begin{pmatrix} M_{1}^{''} & 0 & 0 & 0 \\ 0 & M_{1}^{''} & 0 & 0 \\ 0 & 0 & M_{1}^{''} & 0 \\ 0 & 0 & 0 & M_{1}^{''} \end{pmatrix} \cdot \begin{pmatrix} X_{0} \\ X_{1} \\ X_{2} \\ X_{3} \end{pmatrix}} +}} \\ {{\begin{pmatrix} M_{0} & 0 & 0 & 0 \\ 0 & M_{0} & 0 & 0 \\ 0 & 0 & M_{0} & 0 \\ 0 & 0 & 0 & M_{0} \end{pmatrix} \cdot \begin{pmatrix} X_{0} \\ X_{1} \\ X_{2} \\ X_{3} \end{pmatrix}}} \end{matrix} & \left\lbrack {{Formual}\mspace{14mu} 4} \right\rbrack \end{matrix}$

Here, 4×4 matrices M₁, M₁′ and M₁″ are as shown below.

${M_{1} = \begin{pmatrix} E & B & D & 9 \\ 9 & E & B & D \\ D & 9 & E & B \\ B & D & 9 & E \end{pmatrix}},{M_{1}^{\prime} = \begin{pmatrix} 8 & 8 & 8 & 8 \\ 8 & 8 & 8 & 8 \\ 8 & 8 & 8 & 8 \\ 8 & 8 & 8 & 8 \end{pmatrix}},{M_{1}^{''} = \begin{pmatrix} 4 & 0 & 4 & 0 \\ 0 & 4 & 0 & 4 \\ 4 & 0 & 4 & 0 \\ 0 & 4 & 0 & 4 \end{pmatrix}}$

Meanwhile, in the ARIA algorithm, 128-bit values [w₀, w₁, w₂, w₃, w₄, w₅, w₆, w₇, w₈, w₉, w₁₀, w₁₁, w₁₂, w₁₃, w₁₄, W₁₅] resulting from a diffusion operation on 128-bit input [x₀, x₁, x₂, x₃, x₄, x₅, x₆, x₇, x₈, x₉, x₁₀, x₁₁, x₁₂, x₁₃, x₁₄, x₁₅] may be calculated as shown in Formula 5 below. In Formula 5, w_(i) and x_(i) denote 8-bit unit data. Formula 5 can be arranged as shown in Formula 6 below by a 32-bitwise operation. In Formula 6, W_(i) and X_(i) denote 32-bit unit data.

$\begin{matrix} {\begin{pmatrix} w_{0} \\ w_{1} \\ w_{2} \\ w_{3} \\ w_{4} \\ w_{5} \\ w_{6} \\ w_{7} \\ w_{8} \\ w_{9} \\ w_{10} \\ w_{11} \\ w_{12} \\ w_{13} \\ w_{14} \\ w_{15} \end{pmatrix} = {\begin{pmatrix} 0 & 0 & 0 & 1 & 1 & 0 & 1 & 0 & 1 & 1 & 0 & 0 & 0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 0 & 0 & 1 & 0 & 1 & 1 & 1 & 0 & 0 & 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 1 & 1 & 1 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 1 & 1 & 0 & 1 & 1 & 0 \\ 1 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 1 & 1 \\ 0 & 1 & 0 & 1 & 1 & 0 & 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 & 1 & 1 \\ 1 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 1 & 0 & 1 & 1 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 1 & 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 1 \\ 1 & 1 & 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 & 0 & 1 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 1 & 0 & 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 & 1 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 1 & 0 & 1 & 0 \\ 0 & 1 & 1 & 0 & 0 & 0 & 1 & 1 & 0 & 1 & 0 & 1 & 1 & 0 & 0 & 0 \\ 1 & 0 & 0 & 1 & 0 & 0 & 1 & 1 & 1 & 0 & 1 & 0 & 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 1 & 1 & 1 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 1 & 0 \\ 0 & 1 & 1 & 0 & 1 & 1 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 1 \end{pmatrix} \cdot \begin{pmatrix} x_{0} \\ x_{1} \\ x_{2} \\ x_{3} \\ x_{4} \\ x_{5} \\ x_{6} \\ x_{7} \\ x_{8} \\ x_{9} \\ x_{10} \\ x_{11} \\ x_{12} \\ x_{13} \\ x_{14} \\ x_{15} \end{pmatrix}}} & \left\lbrack {{Formula}\mspace{14mu} 5} \right\rbrack \\ {\begin{pmatrix} W_{0} \\ W_{1} \\ W_{2} \\ W_{3} \end{pmatrix} = {\begin{pmatrix} M_{2} & M_{3} & M_{4} & M_{5} \\ M_{3} & M_{6} & \overset{\_}{M_{5}} & \overset{\_}{M_{4}} \\ M_{4} & \overset{\_}{M_{5}} & M_{7} & \overset{\_}{M_{3}} \\ M_{5} & \overset{\_}{M_{4}} & \overset{\_}{M_{3}} & M_{8} \end{pmatrix} \cdot \begin{pmatrix} X_{0} \\ X_{1} \\ X_{2} \\ X_{3} \end{pmatrix}}} & \left\lbrack {{Formula}\mspace{14mu} 6} \right\rbrack \end{matrix}$

Here, 4×4 matrices M₂, M₃, M₄, M₅, M₆, M₇ and M₈ are as shown below. In Formula 6, M₃ , M₄ and M₅ are matrices consisting of bit-specific inverse elements of their original matrices.

${M_{2} = \begin{pmatrix} 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \end{pmatrix}},{M_{3} = \begin{pmatrix} 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \end{pmatrix}},{M_{4} = \begin{pmatrix} 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & 1 \end{pmatrix}},{M_{5} = \begin{pmatrix} 0 & 1 & 1 & 0 \\ 1 & 0 & 0 & 1 \\ 1 & 0 & 0 & 1 \\ 0 & 1 & 1 & 0 \end{pmatrix}},{M_{6} = \begin{pmatrix} 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}},{M_{7} = \begin{pmatrix} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \end{pmatrix}},{M_{8} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}}$

Therefore, 128-bit values [y₀, y₁, . . . , y₁₅] resulting from the MixColumns operation and 128-bit values [z₀, z₁, . . . , z₁₅] resulting from the InvMixColumns operation on the 128-bit input [x_(o), x₁, . . . , x₁₅] according to the AES algorithm and the values [w₀, w₁, . . . , w₁₅] resulting from the diffusion operation according to the ARIA algorithm may be calculated as shown in Formula 7 below using the common terms.

$\begin{matrix} \left\{ {\begin{matrix} \begin{matrix} {{y_{0} = {{2\; A_{0}} + A_{2} + x_{1}}},{y_{1} = {{2\; A_{1}} + A_{3} + x_{2}}},} \\ {{y_{2} = {{2\; A_{2}} + A_{0} + x_{3}}},{y_{3} = {{2\; A_{3}} + A_{1} + x_{0}}},} \end{matrix} \\ {{y_{4} = {{2\; A_{4}} + A_{6} + x_{5}}},{y_{5} = {{2\; A_{5}} + A_{7} + x_{6}}},} \\ {{y_{6} = {{2\; A_{6}} + A_{4} + x_{7}}},{y_{7} = {{2\; A_{7}} + A_{5} + x_{4}}},} \\ {{y_{8} = {{2\; A_{8}} + A_{10} + x_{9}}},{y_{9} = {{2\; A_{9}} + A_{11} + x_{10}}},} \\ {{y_{10} = {{2\; A_{10}} + A_{8} + x_{11}}},{y_{11} = {{2\; A_{11}} + A_{9} + x_{8}}},} \\ {{y_{12} = {{2\; A_{12}} + A_{14} + x_{13}}},{y_{13} = {{2\; A_{13}} + A_{15} + x_{14}}},} \\ {{y_{14} = {{2\; A_{14}} + A_{12} + x_{15}}},{y_{15} = {{2\; A_{15}} + A_{13} + x_{12}}}} \end{matrix}\left\{ {\begin{matrix} {{z_{0} = {E_{0} + y_{0}}},{z_{1} = {E_{1} + y_{1}}},{z_{2} = {E_{2} + y_{2}}},{z_{3} = {E_{3} + y_{3}}},} \\ {{z_{4} = {E_{2} + y_{4}}},{z_{5} = {E_{3} + y_{5}}},{z_{6} = {E_{2} + y_{6}}},{z_{7} = {E_{3} + y_{7}}},} \\ {{z_{8} = {E_{4} + y_{8}}},{z_{9} = {E_{5} + y_{9}}},{z_{10} = {E_{4} + y_{10}}},{z_{11} = {E_{5} + y_{11}}},} \\ {{z_{12} = {E_{6} + y_{12}}},{z_{13} = {E_{7} + y_{13}}},{z_{14} = {E_{6} + y_{14}}},} \\ {{z_{15} = {E_{7} + y_{15}}},} \end{matrix}\left\{ \begin{matrix} {{w_{0} = {x_{3} + B_{2} + A_{8} + A_{13}}},} \\ {{w_{1} = {x_{2} + B_{3} + A_{8} + A_{15}}},} \\ {{w_{2} = {x_{1} + B_{2} + A_{10} + A_{15}}},} \\ {{w_{3} = {x_{0} + B_{3} + A_{10} + A_{13}}},} \\ {{w_{4} = {B_{0} + x_{5} + A_{11} + A_{14}}},} \\ {{w_{5} = {B_{1} + x_{4} + A_{9} + A_{14}}},} \\ {{w_{6} = {B_{0} + x_{7} + A_{9} + A_{12}}},} \\ {{w_{7} = {B_{1} + x_{6} + A_{11} + A_{12}}},} \\ {{w_{8} = {A_{0} + A_{7} + x_{10} + B_{7}}},} \\ {{w_{9} = {A_{0} + A_{5} + x_{11} + B_{6}}},} \\ {{w_{10} = {A_{2} + A_{5} + x_{8} + B_{7}}},} \\ {{w_{11} = {A_{2} + A_{7} + x_{9} + B_{6}}},} \\ {{w_{12} = {A_{1} + A_{6} + B_{5} + x_{12}}},} \\ {{w_{13} = {A_{3} + A_{6} + B_{4} + x_{13}}},} \\ {{w_{14} = {A_{3} + A_{4} + B_{5} + x_{14}}},} \\ {w_{15} = {A_{1} + A_{4} + B_{4} + x_{15}}} \end{matrix} \right.} \right.} \right. & \left\lbrack {{Formula}\mspace{14mu} 7} \right\rbrack \end{matrix}$

The above used middle terms A_(i), B_(i), C_(i), D_(i) and E_(i) are as shown below.

$\left\{ {\begin{matrix} {{A_{0} = {x_{0} + x_{1}}},{A_{1} = {x_{1} + x_{2}}},} \\ {{A_{2} = {x_{2} + x_{3}}},{A_{3} = {x_{3} + x_{0}}},} \\ {{A_{4} = {x_{4} + x_{5}}},{A_{5} = {x_{5} + x_{6}}},} \\ {{A_{6} = {x_{6} + x_{7}}},{A_{7} = {x_{7} + x_{4}}},} \\ {{A_{8} = {x_{8} + x_{9}}},{A_{9} = {x_{9} + x_{10}}},} \\ {{A_{10} = {x_{10} + x_{11}}},{A_{11} = {x_{11} + x_{8}}},} \\ {{A_{12} = {x_{12} + x_{13}}},{A_{13} = {x_{13} + x_{14}}},} \\ {{A_{14} = {x_{14} + x_{15}}},{A_{15} = {x_{15} + x_{12}}}} \end{matrix}\left\{ {\begin{matrix} {{B_{0} = {x_{0} + x_{2}}},{B_{1} = {x_{1} + x_{3}}},} \\ {{B_{2} = {x_{4} + x_{6}}},{B_{3} = {x_{5} + x_{7}}},} \\ {{B_{4} = {x_{8} + x_{10}}},{B_{5} = {x_{9} + x_{11}}},} \\ {{B_{6} = {x_{12} + x_{14}}},{B_{7} = {x_{13} + x_{15}}},} \end{matrix}\mspace{31mu} \left\{ {\begin{matrix} {{C_{0} = {4\; B_{0}}},{C_{1} = {4\; B_{1}}},} \\ {{C_{2} = {4\; B_{2}}},{C_{3} = {4\; B_{3}}},} \\ {{C_{4} = {4\; B_{4}}},{C_{5} = {4\; B_{5}}},} \\ {{C_{6} = {4\; B_{6}}},{C_{7} = {4\; B_{7}}}} \end{matrix}\left\{ {\begin{matrix} {{D_{0} = {2\left( {C_{0} + C_{1}} \right)}},} \\ {{D_{1} = {2\left( {C_{2} + C_{3}} \right)}},} \\ {{D_{2} = {2\left( {C_{4} + C_{5}} \right)}},} \\ {{D_{3} = {2\left( {C_{6} + C_{7}} \right)}},} \end{matrix}\mspace{31mu} \left\{ \begin{matrix} {{E_{0} = {D_{0} + C_{0}}},{E_{1} = {D_{0} + C_{1}}},} \\ {{E_{2} = {D_{1} + C_{2}}},{E_{3} = {D_{1} + C_{3}}},} \\ {{E_{4} = {D_{2} + C_{4}}},{E_{5} = {D_{2} + C_{5}}},} \\ {{E_{6} = {D_{3} + C_{6}}},{E_{7} = {D_{3} + C_{7}}}} \end{matrix} \right.} \right.} \right.} \right.} \right.$

FIG. 7 is a block diagram of the integrated diffusion layer. Referring to FIG. 7, the integrated diffusion layer generates common terms A 710 and B 720 from a 128-bit input X, generates C 730, D 740 and E 750 from B 720, and generates a MixColumns result Y 760 and an InvMixColumns result Z 770 according to the AES algorithm and a diffusion result W 780 according to the ARIA algorithm from A 710, B 720 and E 750. Finally, a MUX 790 selectively selects a 128-bit result value U.

Thus far, the present invention has suggested an arithmetic method and apparatus for supporting efficient AES and ARIA encryption/decryption algorithms. The arithmetic method and apparatus minimize hardware area using an integrated substitution layer and an integrated diffusion layer while supporting both the AES and ARIA encryption/decryption functions. Therefore, the arithmetic method and apparatus can be efficiently used in smart cards, electronic passports, server-level encryption equipment, etc., requiring both the AES and ARIA encryption algorithms.

While the invention has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. 

1. An arithmetic method of supporting Advanced Encryption Standard (AES) and Academy, Research Institute and Agency (ARIA) encryption/decryption functions, the method comprising the steps of: receiving input data and a round key; performing an S-box operation used in common in AES and ARIA algorithms using the input data and the round key; and extracting the common terms used in a diffusion function of the AES and ARIA algorithms using the data on which the S-box operation is performed, and performing a diffusion operation.
 2. The arithmetic method of claim 1, further comprising the step of: performing key expansion using the input key and thereby generating the round key.
 3. The arithmetic method of claim 1, wherein an AES and ARIA-integrated diffusion layer performs the diffusion operation selectively using one of an AES MixColumns function, an AES InvMixColumns function and an ARIA diffusion function.
 4. The arithmetic method of claim 3, wherein the integrated diffusion layer shares the common terms of the AES MixColumns function, the AES InvMixColumns function and the ARIA diffusion function. 